We use cookies on this website. To find out more about cookies and how they are used on this website, see our Privacy Policy.
By clicking ‘Continue’, you hereby agree with our use of cookies.

{{vmH.selected.familySearch.replace("EonStor ", "")}} Maintenance Guide

{{vmH.selected.familySearch.replace("EonStor ", "")}} User Guide

Maintenance Guide

Expose a Workload as a Service

KS / KS 5000U / KSi 5008U

To make your workload accessible to external hosts or other workloads, you must create a service. There are common types of service:

  • ClusterIP: ClusterIP is the default Service type in Kubernetes, which is only accessible from within the cluster and is suitable for communication between internal applications. ClusterIP is typically used for internal services, such as repository services and backend APIs.
  • NodePort: NodePort enables Service to be accessed through the IP and specified port number of each node, suitable for a staging environment and a simple production environment. NodePort exposes the application to the external network, making it accessible to external users.
  • LoadBalancer: LoadBalancer is a commonly used Service type in a production environment. It can distribute traffic to multiple backend pods to provide high availability and scalability. LoadBalancer is suitable for application scenarios that require high availability and elastic expansion. IEC uses MetalLB as a load balancer by default.

For more information about exposing a workload, see the example: Deploying Nginx.

Procedure

  1. Go to EonKube > Advanced >Service Discovery > Services.
  2. In the top right-hand corner, click Create.
  3. For the service type, choose Load Balancer.
  4. Specify the following settings:
    • Namespace: Choose a namespace.
    • Name: Specify an identifying name. ex: sample-workload-lb
    • (Optional) Description: If needed, specify the description.
  5. Go to the Service Ports section. Specify the following settings:
    • Port Name: Specify an identifying name, ex: http
    • Listening Port: Specify a port number for the new service, ex: 80
    • Protocol: Select TCP or UDP.
    • Target Port: Specify the target port to access the container, ex: 8080
  6. On the left panel, click IP Addresses and go to the IP addresses section.
  7. Specify the following settings:
    • (Optional) Cluster IP: specify a cluster IP address or default random
    • Load Balancer IP: Specify the external IP address of the service (from the pre-defined IP range in the cluster), ensure the IP not used by other services
    • (Optional) External IPs: click Add to assign an external IP
  8. On the left panel, click Selectors, define the Key/Values pairs as the rules to match pods by labels:
    • Key/Value: ex: app=runner

Now users can visit the service by http://<load_balaner_ip>:<listening_port> via a browser.